/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-03-24
 * Time:14:54
 */
public class TestDemo {
    public static int fac(int n){
        if(n==1){
            return n;
        }
        else{
            return n*fac(n-1);
        }

    }
    public static void main(String[] args) {

        System.out.println(fac(5));
    }
}
